<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>我的首页</title>

    <link rel="stylesheet" type="text/css" href="css/style.css">
    <link rel="stylesheet" type="text/css" href="css/index.css">
    <link rel="stylesheet" type="text/css" href="css/icon.css">
    <link rel="stylesheet" type="text/css" href="css/swiper-3.3.1.min.css">

    <script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
    <script type="text/javascript" src="js/swiper-3.3.1.min.js"></script>
    <script type="text/javascript" src="js/util.js"></script>
    <script type="text/javascript" src="js/payCard.js"></script>
</head>
<body>
    <div class="swiper-container swiper-container-horizontal in-swiper-banner">
        <div class="swiper-wrapper in-swiper-weapper">
            <div class="swiper-slide">
                <a href="javascript:void(0)" class="in-swiper-a"><img src="images/home-slide1.png" class="img"></a></div>
            <div class="swiper-slide">
                <a href="javascript:void(0)" class="in-swiper-a"><img src="images/home-slide2.png" class="img"></a></div>
            <div class="swiper-slide">
                <a href="javascript:void(0)" class="in-swiper-a"><img src="images/home-slide3.png" class="img"></a></div>
        </div>
        <div class="swiper-scrollbar">
            <!--<div class="swiper-scrollbar"></div>-->
        </div>
    </div>
    <!--End轮播-->
    <div class="in-payment">
        <ul class="fixed">
            <li>
                <a href="javascript:void(0)">
                    <span class="in-pay-round in-pay-active">
                        <span><img src="images/icon-logo-ylk.png" class="i-icon-quick" /></span>
                    </span>
                    <p class="in-pay-text in-pay-active">银联快捷</p>
                </a>
            </li>
            <li>
                <a href="javascript:notFun()">
                    <span class="in-pay-round">
                        <span><img src="images/icon-logo-wx2.png" class="i-icon-quick"></span>
                    </span>
                    <p class="in-pay-text">微信扫码</p>
                </a>
            </li>
            <li>
                <a href="javascript:notFun()">
                    <span class="in-pay-round">
                        <span><img src="images/icon-logo-zfb2.png" class="i-icon-quick"></span>
                    </span>
                    <p class="in-pay-text">支付宝扫码</p>
                </a>
            </li>
            <li>
                <a href="javascript:notFun()">
                    <span class="in-pay-round">
                        <span><img src="images/icon-logo-ylsm2.png" class="i-icon-quick"></span>
                    </span>
                    <p class="in-pay-text">银联扫码</p>
                </a>
            </li>
        </ul>
    </div>
    <!--End支付-->
    <div class="in-input-money">
        <div class="in-put-money">
            <p><i><img src="images/icon-logo-ylk.png" class="i-icon-quick" /></i>请输入收款金额：</p>
            <p><span>￥</span><span id="sAmount">0.00</span></p>
        </div>
    </div>
    <!--End金额-->
    <div class="in-money-num boxShaw">
        <table border="1" class="in-table-num ">
            <tr>
                <td><a href="javascript:void(0)" ontouchstart="editMoney('1')">1</a></td>
                <td><a href="javascript:void(0)" ontouchstart="editMoney('2')">2</a></td>
                <td><a href="javascript:void(0)" ontouchstart="editMoney('3')">3</a></td>
                <td><a href="javascript:void(0)" ontouchstart="editMoney('del')" class="amountDel"><img src="images/icon-edit-del.png" /></a></td>
            </tr>
            <tr>
                <td><a href="javascript:void(0)" ontouchstart="editMoney('4')">4</a></td>
                <td><a href="javascript:void(0)" ontouchstart="editMoney('5')">5</a></td>
                <td><a href="javascript:void(0)" ontouchstart="editMoney('6')">6</a></td>
                <td rowspan="3"><a href="javascript:void(0)" ontouchstart="editMoney('sure')" class="in-link-a">确认</a></td>
            </tr>
            <tr>
                <td><a href="javascript:void(0)" ontouchstart="editMoney('7')">7</a></td>
                <td><a href="javascript:void(0)" ontouchstart="editMoney('8')">8</a></td>
                <td><a href="javascript:void(0)" ontouchstart="editMoney('9')">9</a></td>
            </tr>
            <tr>
                <td><a href="javascript:void(0)" ontouchstart="editMoney('00')">00</a></td>
                <td><a href="javascript:void(0)" ontouchstart="editMoney('0')">0</a></td>
                <td><a href="javascript:void(0)" ontouchstart="editMoney('.')">.</a></td>
            </tr>
        </table>
    </div>
</body>
<script type="text/javascript">
    var mySwiper = new Swiper('.swiper-container',{
        scrollbar:'.swiper-scrollbar',
        scrollbarHide:false,
		height:180,
    });
	var sAmountCount = $("#sAmount");
	var sAmount = '';
	function editMoney(num){
		if(num==="sure"){	
			var money = sAmountCount.html();
			if(money=="0.00"||util.isEmpty(Number(money))){
				payCard.showMsgTips("请输入金额");
				return;
			}
			else{//前往通道
				
				return;
			}
		}
		if(sAmount.length>14&&num!="del"){
			payCard.showMsgTips("请输入正常的金额");
			return;
		}
		if(num==="del"){
			if(util.isEmpty(sAmount))
				return;
			else if(sAmount.length===1){
				sAmount = sAmount.substring(0,sAmount.length-1);
				sAmountCount.html('0.00');
				return;
			}else
				sAmount = sAmount.substring(0,sAmount.length-1);
		}
		else if(num==="."){
			if(util.isEmpty(sAmount))
				sAmount = '0'+num;
			else if(sAmount.indexOf('.')>=0){
				return;
			}
			else 
				sAmount = sAmount+num;
		}
		else{
			sAmount = sAmount+num;
		}
		sAmountCount.html(sAmount);
	}
	function notFun(){
		payCard.showMsgTips("近期将逐步退出");
	}
	
	/* 计算屏幕高度，只显示一屏 */
	var imgWH = {w:828,h:369};
	var allDivH = util.windowW==320?194:228;
	var surplusH = util.windowH - allDivH - imgWH.h*util.windowW/imgWH.w;
	console.log(surplusH);
	var keyboardH = surplusH/4;
	console.log(keyboardH);
	$(".in-table-num tr td").height(keyboardH);
	/* 计算屏幕高度，只显示一屏 */
</script>
</html>